if ( strcmp(fmp->key, "LAT_HUMAN_READABLE") == 0) {
human_to_dec( s, &wpt->latitude, &wpt->longitude );
} else
+ if ( strcmp(fmp->key, "LAT_NMEA") == 0) {
+ wpt->latitude = ddmm2degrees(wpt->latitude);
+ } else
/* LONGITUDE CONVERSIONS ***********************************************/
if (strcmp(fmp->key, "LON_DECIMAL") == 0) {
/* longitude as a pure decimal value */
if ( strcmp(fmp->key, "LON_HUMAN_READABLE") == 0) {
human_to_dec( s, &wpt->latitude, &wpt->longitude );
} else
+ if ( strcmp(fmp->key, "LON_NMEA") == 0) {
+ wpt->latitude = ddmm2degrees(wpt->longitude);
+ } else
/* LAT AND LON CONVERSIONS ********************************************/
if ( strcmp(fmp->key, "LATLON_HUMAN_READABLE") == 0) {
human_to_dec( s, &wpt->latitude, &wpt->longitude );
if (strcmp(fmp->key, "LAT_HUMAN_READABLE") == 0) {
dec_to_human( buff, fmp->printfc, "SN", wpt->latitude );
} else
+ if (strcmp(fmp->key, "LAT_NMEA") == 0) {
+ sprintf(buff, fmp->printfc, degrees2ddmm(wpt->latitude));
+ } else
/* LONGITUDE CONVERSIONS*********************************************/
if (strcmp(fmp->key, "LON_DECIMAL") == 0) {
dec_to_human( buff+strlen(buff), fmp->printfc, "WE",
wpt->longitude );
} else
+ if (strcmp(fmp->key, "LON_NMEA") == 0) {
+ sprintf(buff, fmp->printfc, degrees2ddmm(wpt->longitude));
+ } else
/* DIRECTIONS *******************************************************/
if (strcmp(fmp->key, "LAT_DIR") == 0) {
to the letter "n" in "min" and the letter "e" in "deg."
example: IFIELD LAT_HUMAN_READABLE,"","%d %d %f%c" (writes 31 40 00.000N)
+ o LAT_NMEA
+ Defines the latitude in the format used by the NMEA standard which is
+ degrees multiplied by 100 plus decimal minutes.
+
+ example: IFIELD LAT_NMEA, "%f", "%08.3f" (writes 3558.322)
+
+ o LON_NMEA
+ Defines the longitude in the format used by the NMEA standard which is
+ degrees multiplied by 100 plus decimal minutes.
+
+ example: IFIELD LON_NMEA, "%f", "%010.3f" (writes -08708.082)
+
o LON_HUMAN_READABLE
See LAT_HUMAN_READABLE except LON_HUMAN_READABLE defines LONGITUDE.